import { ModalComponent } from '../modal/modal.component';

export abstract class ModalRef<T = any> {
  abstract open(): void;

  /**
   * Trigger the lvOnOk by manual
   */
  abstract triggerOk(): void;

  /**
   * Get the dom element of this Modal
   */
  abstract getModalElement();

  /**
   * Trigger the lvOnCancel by manual
   */
  abstract triggerCancel(): void;

  /**
   * Return the component instance of lvContent as a Component
   */
  abstract getContentComponent();

  abstract close(result?: any): void;

  /**
   * Set properties in the content component via ModalRef
   */
  abstract setProperty(options): void;

  /**
   * Trigger the custom button by manual(params: button id)
   */
  abstract triggerCustomButton(id): void;

  /**
   * Get the instance of the Modal itself
   */
  abstract getInstance(): ModalComponent<T>;
}
